package top.simonby.iron.core.context;

import io.swagger.v3.oas.models.OpenAPI;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import top.simonby.iron.base.support.OpenApiBuilder;

/**
 * @author 91223
 * @date 2021/11/26
 */
@Configuration
@ConditionalOnClass(OpenAPI.class)
public class OpenApiConfiguration {

    @Bean
    @Primary
    public OpenAPI springOpenAPI() {
        return new OpenApiBuilder().springOpenAPI("0.0.1");
    }
}
